package com.disability_federation.mapper;

import com.disability_federation.pojo.CountyAmountsCollection;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 县级残保金代收名单（地税局）-数据库接口
 */
@Mapper
public interface MapperCountyAmountsCollection {

    //查询全部代扣名单
    //默认时间升序排序
    @Select("select * from county_amounts_collecting.county_amounts_collecting order by collection_time")
    List<CountyAmountsCollection> query();

    //查询全部代扣名单
    //默认时间降序排序
    @Select("select * from county_amounts_collecting.county_amounts_collecting order by collection_time desc")
    List<CountyAmountsCollection> queryDesc();

    //查询全部代扣名单
    //金额升序排序
    @Select("select * from county_amounts_collecting.county_amounts_collecting order by money")
    List<CountyAmountsCollection> queryMoneyAsc();

    //查询全部代扣名单
    //金额降序排序
    @Select("select * from county_amounts_collecting.county_amounts_collecting order by money desc")
    List<CountyAmountsCollection> queryMoneyDesc();

    //查询全部代扣名单
    //姓名升序排序
    @Select("select * from county_amounts_collecting.county_amounts_collecting order by user_name")
    List<CountyAmountsCollection> queryNameAsc();

    //查询全部代扣名单
    //姓名降序排序
    @Select("select * from county_amounts_collecting.county_amounts_collecting order by user_name desc")
    List<CountyAmountsCollection> queryNameDesc();

    //查询全部代扣名单
    //企业升序排序
    @Select("select * from county_amounts_collecting.county_amounts_collecting order by enterprise")
    List<CountyAmountsCollection> queryEnterpriseAsc();

    //查询全部代扣名单
    //企业降序排序
    @Select("select * from county_amounts_collecting.county_amounts_collecting order by enterprise desc")
    List<CountyAmountsCollection> queryEnterpriseDesc();

    //条件查询
    //默认时间升序排序
    List<CountyAmountsCollection> queryCondition(String name, String enterprise, Integer money1, Integer money2);

    //条件查询
    //时间降序排序
    List<CountyAmountsCollection> queryConditionDesc(String name, String enterprise, Integer money1, Integer money2);

    //条件查询
    //金额升序排序
    List<CountyAmountsCollection> queryConditionMoneyAsc(String name, String enterprise, Integer money1, Integer money2);

    //条件查询
    //金额降序排序
    List<CountyAmountsCollection> queryConditionMoneyDesc(String name, String enterprise, Integer money1, Integer money2);

    //条件查询
    //姓名升序排序
    List<CountyAmountsCollection> queryConditionNameAsc(String name, String enterprise, Integer money1, Integer money2);

    //条件查询
    //姓名降序排序
    List<CountyAmountsCollection> queryConditionNameDesc(String name, String enterprise, Integer money1, Integer money2);

    //条件查询
    //企业升序排序
    List<CountyAmountsCollection> queryConditionEnterpriseAsc(String name, String enterprise, Integer money1, Integer money2);

    //条件查询
    //企业降序排序
    List<CountyAmountsCollection> queryConditionEnterpriseDesc(String name, String enterprise, Integer money1, Integer money2);
}
